﻿@{
    Layout = null;
}
@model ElingOA6_Admin_DSJCJ.Model.ItemRequisitionApply
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
<title>用品采购申请</title>
      @if (false)
      {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
      }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/My97DatePicker/WdatePicker.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(

                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )
    <script type="text/javascript">
        $(document).ready(function () {
            var json = $("#hdjson").val();                       
            if(json != "")
            {
            var model = JSON.parse(json);
            var tableName = "additem";
            var array = "";            
                for (var i = 0; i < model.length; i++) {
                    array += model[i]["FItemNo"] + ",";
                    $("#hditemNo").val(array);
                    $("#additem").append("<tr id='" + model[i]["FItemNo"] + "'  height='30' >" +
                    "<td align='center' class='tdClass'>"+
                    "<a href='#' onclick='popDialog(\""+ model[i]["FItemNo"] +"\")'>" + model[i]["FItemName"] + "</a></td>" +
                    "<td align='center' class='tdClass'>" + model[i]["FQty"] + "</td>" +
                    "<td align='center' class='tdClass'>" + model[i]["FPrice"] + "</td>" +
                    "<td align='center' class='tdClass'>" + model[i]["FAmount"] + "</td></tr>");                       
                }
            }

        });

        function popDialog(itemNo){
            window.showModalDialog(rootPath + "/Admin/OfficeItemPurchaseApply/OfficeItemPurchaseApplyAddEntryInfo?itemNo=" + itemNo, 'popDialog', 'dialogWidth:500px;dialogHeight:220px');
            
        }



    </script>
</head>
<body>
     <table width="100%">
        <tr>
            <td>&nbsp;</td>
            <td>
                <table width="100%" align="center" class="tableForm">
                <tr><td>&nbsp;</td></tr>
                <tr><td>&nbsp;</td></tr>
            <tr height="30">
                <td colspan="4" style="color: #CC0000;font-weight: bold;font-size: 22px;text-align:center;">领用申请单</td>
            </tr>
            <tr height="30">
                <td align="right" class="tdClass" width="10%">申请单号:</td>
                <td class="tdClass">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FItemRequisitionApplyID";
                   settings.Width = 200;
                   settings.Height = 20;
                   settings.Text = Model.FItemRequisitionApplyID.ToString();
                   settings.Enabled = false;
               }).GetHtml()
                </td>
                 <td align="right" class="tdClass">填报日期:</td>
                <td class="tdClass">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FApplyDate";
                   settings.Width = 200;
                   settings.Text = DateTime.Parse(Model.FApplyDate.ToString() == "" ? DateTime.Now.ToString() : Model.FApplyDate.ToString()).ToString("yyyy-MM-dd");
                   settings.Enabled = false;
               }).GetHtml()
                </td>
            </tr>
            <tr height="30">
                <td align="right" class="tdClass">申请部门:</td>
                <td class="tdClass">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "DeptName";
                   settings.Width = 200;
                   settings.Text = Model.FApplyDeptName;
                   settings.Enabled = false;
               }).GetHtml()
                </td>
                 <td align="right" class="tdClass">申请人:</td>
                <td class="tdClass" >
                     @Html.DevExpress().Label(settings =>
                {
                    settings.Name = "FEmpName";
                    settings.Width = 200;
                    settings.Text = Model.FApplyEmplName;
                    settings.Enabled = false;
                }).GetHtml()
                </td>
            </tr>
             <tr>
                <td align="right" class="tdClass" >申请原因:</td>
                <td colspan="3" class="tdClass">
                    @Html.DevExpress().Label(settings =>
               {
                   settings.Name = "FApplyReason";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(60);
                   settings.Height = 30;
                   settings.Text = Model.FApplyReason;
                   settings.Enabled = false;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td colspan="4" class="tdClass">
                <table id="additem" width="600" align="center" border="0" class="tableForm">
                   <tr>                        
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "用品名称"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "单价"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "库存"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                        <th width="20%" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "申请数量"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</th>
                    </tr>   
                </table>  
                                                   
                         
                </td>
            </tr>
    </table>
            </td>
        <td>&nbsp;</td>
        </tr>
     
     </table>

     
    @Html.Hidden("hdjson", ViewData["json"])
    
     <script type="text/javascript">
         lp.Hide();
    </script>
</body>
</html>
